import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { PagedResultDto } from '@abp/ng.core';

@Injectable({
  providedIn: 'root'
})
export class PurchaseOrderService {
  private apiUrl = '/api/app/purchase-order';

  constructor(private http: HttpClient) { }

  getList(params: any): Observable<PagedResultDto<any>> {
    return this.http.get<PagedResultDto<any>>(this.apiUrl, { params });
  }

  get(id: string): Observable<any> {
    return this.http.get<any>(`${this.apiUrl}/${id}`);
  }
} 